package com.zg.nacos.domain.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.zg.common.core.vo.BaseVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * <p>Description: </p>
 *
 * @author zhanfeng.liang
 * @since 2025/6/26 19:47
 */

@Data
@ApiModel
public class MicroUserVo extends BaseVo {
    @ApiModelProperty(value = "主键ID", example = "1")
    private Long id;

    @ApiModelProperty(value = "微密码", required = true, example = "abc123")
    private String microPwd;

    @ApiModelProperty(value = "用户名", required = true, example = "1001")
    private String  username;

    @ApiModelProperty(value = "创建人", example = "admin")
    private String createBy;

    @ApiModelProperty(value = "更新人", example = "admin")
    private String updateBy;

    @ApiModelProperty(value = "版本号（乐观锁）", example = "1")
    private Integer ver;

    @ApiModelProperty(value = "是否删除（0-未删除，1-已删除）", example = "0")
    private boolean isDel;

    @ApiModelProperty(value = "搜索字段", example = "keyword")
    private String searchStr;

    @ApiModelProperty(value = "创建时间", example = "2023-01-01 00:00:00")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", shape = JsonFormat.Shape.STRING, timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @ApiModelProperty(value = "更新时间", example = "2023-01-01 00:00:00")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", shape = JsonFormat.Shape.STRING, timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    private String nacosRole;

    private String nacosResource;

}
